<template>
	<!-- 仓库管理 -->
	<div>
		<headpage username="仓库管理" routername="main1"></headpage>
    <div class="head">
      <ul>
        <li v-for="(item,index) in list" :key="index" @click="jump(index)">
        {{item.text}}
        <p>{{item.name}}</p>
        </li>
      </ul>
    </div>
		<div class="foot">
			<ul class="list">
				<li>新建仓库</li>
				<li>仓库设置</li>
			</ul>
		</div>
	</div>
</template>

<script>
	import headpage from"../headpage.vue"
	export default{
		name:"warehouse_management",
		components:{
			headpage
		},
    data(){
      return{
        list:[
          {
            text:"食品仓库",
            name:'王贤希',
            k:"listFood"
          },
          {
            text:"饮品仓库",
            name:"何芹",
            k:"listDrink"
          },
          {
            text:"生活用品仓库",
            name:"魏佳栋",
            k:"listLivingGoods"
          }
        ]
      }
    },
    methods:{
      jump(index){
        this.$router.push({
          name:"warehouse",
          params:{
            address:this.list[index].k
          }
        }).catch(err=>err)
      }
    }
	}
</script>

<style scoped="scoped">
	ul,li,p,h5{
		margin:0;
		padding:0;
		list-style: none;
		text-decoration: none;
	}
	.head p{
		color:rgba(0,0,0,0.5);
		font-size:10px;
	}
  .head{
    padding:10px;
  }
  .head li{
    border-bottom:1px solid rgba(0,0,0,0.1);
    line-height:20px;
    padding:5px;
  }


	.foot{
		width:100%;
		position:fixed;
		bottom:0;
		padding:10px 20px 10px 20px;
	}
	.list{
		display:flex;
	}
	.list li{
		width:60%;
		color:lightblue;
	}
	.list li:last-child{
		text-align: right;
	}
</style>
